Deep learning based adaptive arithmetic coding and codelength regularization

ABSTRACT

A deep learning based compression (DLBC) system applies trained models to compress binary code of an input image to a target codelength. For a set of binary codes representing the quantized coefficents of an input image, the DLBC system applies a first model that is trained to predict feature probabilities based on the context of each bit of the binary codes. The DLBC system compresses the binary code via adaptive arithmetic coding based on the determined probability of each bit. The compressed binary code represents a balance between a reconstruction quality of a reconstruction of the input image and a target compression ratio of the compressed binary code.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a divisional application of U.S. patent applicationSer. No. 15/439,895, filed on Feb. 22, 2017, which claims priority toProvisional U.S. Application No. 62/434,600, filed Dec. 15, 2016,Provisional U.S. Application No. 62/434,602, filed Dec. 15, 2016,Provisional U.S. Application No. 62/434,603, filed Dec. 15, 2016, andProvisional U.S. Application No. 62/458,749, filed Feb. 14, 2017. Eachaforementioned application is incorporated herein by reference in itsentirety.

BACKGROUND

This invention generally relates to presenting content, and morespecifically to generating a progressive version of a digital mediacontent, such as images and videos, using machine learning techniques.

Streaming of digital media makes a large portion of internet trafficwith projections to reach an even higher portion by 2020. Existingapproaches to digital media content compression such as imagecompression, however, have not been able to adapt to the growing demandand the changing landscape of applications. Compression of digital mediacontent, in general, is to identify and reduce irrelevance andredundancy of the digital media content for compact storage andefficient transmission over a network. If the structure in an input(e.g., image or video) can be discovered, then the input can berepresented more succinctly. Hence, many compression approachestransform the input in its original type of representation to adifferent type of representation, e.g., the discrete cosine transform(DCT),where the spatial redundancy of the input can be more convenientlyexploited by a coding scheme to attain a more compact representation.However, in existing image compression approaches deployed in practice,the mechanisms for structure exploitation are hard-coded: for instance,JPEG employs 8×8 DCT transforms, followed by run-length encoding; JPEG2000 applies wavelets followed by arithmetic coding, where the waveletkernels used in the transform are hard-coded, and fixed irrespective ofthe scale and channel of input data.

Additionally, it is often desirable to send different client devicesdifferent bitrate versions of the same content, as a function of theirbandwidths. Thus, a user of the client device can consume a version ofthe content that is best suited for the client device. However, thisimplies that for every target bitrate, the content must be re-encoded,and the corresponding code must be stored separately. Therefore, giventhe non-optimal nature of existing approaches to compression, having tore-encode the content for each target bitrate requires significantcomputational resources both for generating each compression and forcontinually maintaining and/or storing each generated compression

SUMMARY

A deep learning based compression (DLBC) system employs machine learningtechniques, such as deep learning, in order to automatically discoverstructures of an input image or input video. As opposed to hard-codedtechniques, enabling the automatic discovery of structures enables themore efficient representation of an input image. Namely, the encodedinput image encoded through deep learning techniques achieves improvedreconstruction quality and improved compression ratios as compared toconventional techniques. For example, one or more models can be trainedonce based on machine learning techniques, but the trained models can beapplied to input images regardless of input image dimensions and desiredtarget bit rate, and the one or more trained models are progressive withincreased image reconstruction quality in response to increasedavailable bits for compression.

In various embodiments, during a deployment phase, the DLBC systemreceives binary code bitplanes that correspond to quantized coefficientsof an input image. The DLBC system applies trained models to the binarycode bitplanes to compress the binary code to a target codelength viaadaptive variable length arithmetic coding.

During a training phase, the DLBC system may train a model to predictfeature probabilities based on the context of each bit of the binarycodes. For example, the context of each bit includes the bitplane thatthe bit resides on and values of neighboring bits. Therefore, during thedeployment phase, the DLBC system predicts the probability of each bitbased on the predicted feature probabilities of the model.

Additionally, during the training phase, The DLBC system may train adifferent model that effectively generates the quantized coefficients ofthe input image. During training, the model receives feedbackinformation that attempts to regularize the codelength of the compressedbinary code to achieve a target compression. Namely, the DLBC systemcalculates a penalty for each quantized coefficient of the input image.In various embodiments, quantized coefficients that are large inmagnitude in terms of their corresponding bitplanes and that deviatefrom neighboring quantized coefficients on a same bitplane are heavilypenalized. Thus, when applied during the deployment phase, this trainedmodel induces features in the extracted quantized coefficients, therebyenabling the DLBC system to improve the compression of the binary codesto achieve the target compression ratio.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a system environment including a deeplearning based compression system, in accordance with an embodiment.

FIG. 2A is flow diagram of the architecture of the deep learning basedcompression system during the training phase, in accordance with anembodiment.

FIG. 2B is flow diagram of the architecture of the deep learning basedcompression system during the deployment phase, in accordance with anembodiment.

FIG. 3A depicts an example coefficient extraction process foridentifying structures in an input image, in accordance with anembodiment.

FIG. 3B depicts an example process of bitplane decomposition andadaptive arithmetic coding, in accordance with an embodiment.

FIG. 4A illustrates the training process of an adaptive arithmeticcoding module, in accordance with an embodiment.

FIG. 4B illustrates the deployment process of the adaptive arithmeticcoding module, in accordance with an embodiment.

FIG. 5 depicts the generation of a progressive representation of aninput image, in accordance with an embodiment.

FIG. 6 is a flowchart for the generation of a compressed input image, inaccordance with an embodiment.

FIG. 7 is a flowchart for providing a progressive representation of anencoded input image to a client device, in accordance with anembodiment.

FIG. 8 is a flowchart for generating a compressed encoding of an inputimage with a target codelength, in accordance with an embodiment.

The figures depict various embodiments of the present invention forpurposes of illustration only. One skilled in the art will readilyrecognize from the following discussion that alternative embodiments ofthe structures and methods illustrated herein may be employed withoutdeparting from the principles of the invention described herein.

The figures use like reference numerals to identify like elements. Aletter after a reference numeral, such as “110A,” indicates that thetext refers specifically to the element having that particular referencenumeral. A reference numeral in the text without a following letter,such as “110,” refers to any or all of the elements in the figuresbearing that reference numeral (e.g. “client device 110” in the textrefers to reference numerals “client device 110A” and/or “client device110B” in the figures).

DETAILED DESCRIPTION System Architecture

FIG. 1 is a block diagram of a system environment 100 including a deeplearning based compression (DLBC) system 130, in accordance with anembodiment. Additionally, the system environment 100 includes one ormore client devices 110. The DLBC system 130 encodes digital content,such as images or videos, and provides the compressed digital content toa client device 110.

The client device 110 is a computing device capable of receiving userinput as well as transmitting and/or receiving data via the network 120.In one embodiment, the client device 110 is a conventional computersystem, such as a desktop or a laptop computer. Alternatively, theclient device 110 may be a device having computer functionality, such asa personal digital assistant (PDA), a mobile telephone, a smartphone oranother suitable device. In various embodiments, specialized applicationsoftware that runs native on a client device 110 is used as an interfaceto connect to the DLBC system 130. While FIG. 1 depicts two clientdevices 110, in various embodiments, any number of client devices 110may communicate through the network 120 with the DLBC system 130.Different client devices 110 may have different characteristics such asdifferent processing capabilities, different connection speeds with theDLBC system 130 and/or third party system 125 over the network 120, anddifferent device types (e.g., make, manufacture, version).

In various embodiments, a client device 110 may include a decoder module115 that is configured to decode content received through the network120 from the DLBC system 130. In some scenarios, the decoder module 115of the client device 110 receives instructions from the DLBC system 130in order to appropriately decode the content. Therefore, once decoded bythe decoder module 115, the client device 110 can appropriately playbackand/or present the content for playback.

In various embodiments, a client device 110 may be configured to presentinformation to and receive information from a user of the client device110. For example, the client device 110 may include a user interfacesuch as a display that the client device 110 uses to present content tothe user. Therefore, a user of the client device 110 can provide userinputs through the user interface and the DLBC system 130 providescontent to the client device 110 in response to the user input. As anexample, a user input provided by a user through the user interface 112of the client device 110 may be a request for particular digital contentsuch as an image or video.

The DLBC system 130 encodes digital content, such as an image or videoframes of a video, with a particular reconstruction quality andcompression ratio or target bitrate. The DLBC system 130 will behereafter described in reference to encoding an image; however, thedescriptions may be similarly applied to a video. In variousembodiments, the DLBC system 130 employs machine learning techniques totrain models using feature vectors of positive training set and negativetraining set serving as inputs. In other embodiments, the inputs may benon-binary. The DLBC system 130 then applies the trained models toencode images. For example, a machine learning technique may be aconvolutional network capable of unsupervised deep learning.Additionally, machine learning techniques employed by the DLBC system130 include, but are not limited to, neural networks, naïve Bayes,support vector machines, short-term memory networks, logisticregression, random forests, bagged trees, decision trees, boosted treesand machine learning used in HIVE™ frameworks, in different embodiments.The trained models, when applied to the feature vector extracted from aninput image, outputs an estimation of various structures of the inputimage across different input channels, within individual scales, acrossscales and the combination of thereof.

In various embodiments, the modules of the DLBC system 130 may train andfine-tune their respective machine learning models in stages, indifferent training spaces and dimensions. For example, a featureextraction model is trained, starting with training an easier model,e.g., for each scale of an input image, then using it as a startingpoint to train a more complicated model that has similar architecture tothe easier model, e.g., a feature extraction model aligned to leverageinformation shared across different scales of the input image. Thetraining can be conducted in a cascade where each model in the cascadeis trained by fine-tuning a previous model within the cascade.Additionally, the models are trained on different learnable or trainingparameters. As a first example, the model is trained based on abottleneck such as compressed binary codes subject to a bandwidthconstraint. For example, the easier model is first trained on a largebottleneck, and more complicated models trained on decreasing sizes ofthe bottleneck. This reduction in the size of the bottleneck can beachieved by increasing the degree of quantization associated with binarytensor for generating the optimized compressed binary codes.

As another example, a machine learning model is trained based on aninput image size. For example, an easier model can be trained on asmaller patch size of an input image (e.g., 64×64) and a second, morecomplicated model can be fine-tuned from the easier model for a largerpatch size (e.g., 256×256). Other examples of training the machinelearning models in stages include training based on a task such astraining a first model on generic images and fine-tuning a second modelbased on the first model on targeted domains (e.g., faces, pedestrians,cartoons, etc.).

In the embodiment shown in FIG. 1, the DLBC system 130 includes anencoder module 140, a decoder module 150, an adaptive codelengthregularization (ACR) module 160, a reconstruction feedback module 170,and a discriminator module 180. Furthermore, the DLBC system 130includes a training data store 190 where the data used to traindifferent machine learning models are stored. In various embodiments,the encoder module 140 and the ACR module 160 each train one or moremachine learning models that are deployed when encoding an image. Asdescribed further herein, the process performed by the individualmodules of the DLBC system 130 will be described as pertaining to atraining phase or to a deployment phase. Specifically, the trainingphase refers to the training of one or more machine learning models by amodule of the DLBC system 130. The deployment phase refers to theapplication of the one or more trained machine learning models.

Referring now to the individual modules, the encoder module 140 trainsone or more machine learning models during the training phase that arethen applied during the deployment phase to efficiently encode an image.The output of the encoder module 140 is hereafter referred to ascompressed code.

To determine and improve the quality of the encoded image, thecompressed code is provided to the decoder module 150 that performs theinverse operation of the encoder module 140 during the training phase.In other words, an input image encoded by the encoder module 140 can besubsequently decoded by the decoder module 150. In doing so, the decodermodule 150 outputs what is hereafter referred to as a reconstructedinput image. The reconstruction feedback module 170 compares theoriginal input image to the reconstructed input image generated by thedecoder module 150 to determine the extent of quality loss that occurredduring the encoding process. As such, the reconstruction feedback module170 provides the quality loss information as feedback. For example, thereconstruction feedback module 170 stores the quality loss informationin the training data store 190 such that the machine learning modelstrained by the encoder module 140 can be further trained to improve thequality loss.

The discriminator module 180 uses generative adversarial network (GAN)approaches to improve the compression and reconstruction quality ofinput images. For example, the discriminator module 180 can train amodel in parallel with the encoder module 140 such that the encodermodule 140 can more efficiently encode the input image with higherquality.

To achieve a target compression ratio or target bit rate of the encodedimage, the ACR module 160 may monitor the codelength of the compressedbinary codes generated by the encoder module 140. The ACR module 160 mayprovide feedback to the encoder module 140 to adjust the trained modelstrained by the encoder module 140 in order to achieve a targetcodelength of the compressed binary codes. Further descriptionsregarding each of the modules in the DLBC system 130 are describedbelow.

In various embodiments, the system environment 100 may further include athird party system that can provide encoded content to one or moreclient devices 110. In this scenario, the DLBC system 130 may generateencoding technology (e.g., trained models) and provide it to a thirdparty system such that the third party system can appropriately encodeand/or decode content that are to be provided to one or more clientdevices 110.

Training Phase of the Autoencoding Process Encoding Process

FIG. 2A is flow diagram of the architecture of the DLBC system 130during the training phase, in accordance with an embodiment. As depictedin FIG. 2A, the forward flow of information between modules is depictedas solid arrows whereas the feedback of information is depicted asdotted arrows. In various embodiments, information that is to be fedback through the modules is stored in the training data store 190 suchthat the appropriate module can retrieve the information to train amachine learning model.

During the training phase, the encoder module 140 receives an inputimage 205. The input image 205 may be selected specifically for thetraining phase and obtained from the training data store 190. In variousembodiments, the content encoder module 140 employs a feature extractionmodule 210, a quantization module 215, a bitplane decomposition module220, a progressive representation module 250, and an adaptive arithmeticcoding (AAC) module 225. As previously stated, the encoder module 140trains machine learning models to efficiently encode the input image 205into compressed code. More specifically, individual modules in theencoder module 140 including the feature extraction module 210 and theAAC module 225 each train at least one machine learning model togenerate the compressed binary codes.

The feature extraction module 210 trains and applies a machine learningmodel, e.g., feature extraction model, such that the feature extractionmodule 210 can use the trained feature extraction model to recognizedifferent types of structures in the input image 205. In one embodiment,3 different types of structures in an input image are recognized: (1)structures across input channels of the image, (2) structures withinindividual scales, and (3) structures across scales. In variousembodiments, the input image 205 may be a video frame of a video contentthat contains a sequence of video frames. To process a sequence of videoframes, the feature extraction model may be trained with respect to thetemporal sequence of video frames such that the feature extractionmodule 210 can effectively exploit structures across the sequence ofvideo frames of the video content. To identify structures in the inputimage 205, the feature extraction module 210 performs a pyramidaldecomposition on the input image, which analyzes the input image atindividual scales by downsampling the original input image. Thus, thefeature extraction module 210 extracts coefficients at each individualscale. Subsequently, the feature extraction module 210 performs aninterscale alignment procedure which exploits structures shared acrossthe individual scales.

Reference is now made to FIG. 3A, which depicts an example coefficientextraction process performed by the feature extraction module 210 foridentifying structures in an input image 205, in accordance with anembodiment. The feature extraction module 210 receives an input image xand performs recursive analysis of the input image x over a total of Mscales, where parameter x_(m) represents the input image x to scale mand the input to the first scale is set to x₁=x. For each scale, thefeature extraction module 210 performs two operations: (1) extractingcoefficients c_(m)=f_(m)(x_(m)) ∈R^(C) ^(m) ^(×H) ^(m) ^(×W) ^(m) via aparameterized function f_(m)(⋅) for output channels C_(m), height H_(m),and width W_(m); and (2) computing the input to the next scale asx_(m+1)=D_(m)(x_(m)), where D_(m)(⋅) is downsampling operator for themth scale.

The feature extraction module 210 begins with the input image 205 thathas an initial dimensionality at an initial scale of an initial height(H₀), an initial width (W₀), and an initial number of channels (C₀). Thefeature extraction module 210 downsamples (represented by the “D”function depicted in FIG. 3A) the input image 205 to a second scale toget a first downscaled image 310A. In various embodiments, the firstdownscaled image 310A has a dimensionality at this second scale of afirst downscaled height (H₁), a first downscaled width (W₁), and a firstnumber of channels (C₁). The first downscaled height (H₁) and a firstdownscaled width (W₁) are each reduced from the initial height (H₀) andinitial width (W₀), respectively of the input image 205 at the initialscale. The first number of channels (C₁) may be increased or decreasedfrom initial number of channels (C₀) according to the downsamplingoperator. The feature extraction module 210 may continue to downscalethe first downscaled image 310A (e.g., at a second scale) to obtain asecond downscaled image 310B (e.g., at a third scale) using anotherdownscaling operator. The feature extraction module 210 can continuedownscaling for a total of M scales to generate a total of M−1downscaled images 310.

As an example, the input image 205 may have initial C×H×W dimensions of3×1080×1920. Therefore, the feature extraction module 210 applies adownsampling operator D₁(⋅) to downsample the input image 205 togenerate a first downsampled image 310A with dimensions of 64×540×960.This can be further downsampled using downsampling operator D₂(⋅) to asecond downsampled image 310B with dimensions of 64×270×480. Althoughthis example depicts a decreasing dimensionality of the height and widthby a factor of 2 after the application of a downsampling operator, thedimensionality may be reduced in other fashions (e.g., non-linearly)according to the downsampling operator. In various embodiments, thedownsampler operator D_(m)(⋅) is non-linear and is applied by a trainedmachine learning model that is trained during the training phase toidentify the optimal downsampling operator for identifying structures inthe input image 205.

At each individual scale, the feature extraction module 210 may employ atrained feature extraction model specific for that scale. The trainedfeature extraction model identifies the coefficients of the input imagefor extraction at each scale. As such, as an input image 205 isdownscaled to different scales of the M total scales, the featureextraction module 210 may successively input a trained featureextraction model for a first scale m into the next scale m+1 in order totrain a complex feature extraction model for the next scale.

Therefore, at each scale, the feature extraction module 210 extractscoefficients from each input image x_(m) via a parameterized functionf_(m)(⋅) as shown in FIG. 3A. The extracted coefficients from eachindividual scale m may be represented as c_(m). As depicted in FIG. 3A,the extracted coefficients from input image 205 are represented asc₁(320A), the extracted coefficients from downscaled first image 310Aare represented as c₂(320B), and the extracted coefficients fromdownscaled second image 310B are represented as c₃(320C).

In various embodiments, if the input image 205 is a video frame from avideo content, the feature extraction module 210 extracts coefficientsfrom the video frame while also considering the identified structures(i.e., extracted coefficients) from prior video frames of the videocontent. For example, the feature extraction module 210 may furthertrain a frame predictor model that outputs a residual frame based on apredicted current frame given an input of one or more previous framesand actual current frame of the video content. In other embodiments, theframe predictor model predicts feature coefficients in the residualframe given the feature coefficients of the previous frames and featurecoefficients of the actual current frame. As an example, the framepredictor model receives extracted feature coefficients from previousvideo frames that are M different scales. The frame predictor model thenpredicts coefficients at a same or different number of scales.

With the extracted coefficients at a variety of individual scales, thefeature extraction module 210 conducts an interscale alignment that isdesigned to leverage the information shared across the different scales.In other words, the feature extraction module 210 identifies jointstructures across the individual scales according to the extractedcoefficients. It takes in as input the set of coefficients extractedfrom each individual scale, {c_(m)}_(m+1) ^(M)∈R^(C) ^(m) ^(×H) ^(m)^(×W) ^(m) , and produces a tensor of a target output dimensionalityC×H×W. In various embodiments, the target output dimensionality may bepredetermined (e.g., hard-coded) given the dimensionality of the inputimage 205 across the scales.

To do this, the set of extracted coefficients from each individual scaleC_(m) are mapped to the target output dimensionality via a parameterizedfunction g_(m)(⋅) as depicted in FIG. 3A. Therefore, at each individualscale, a single tensor with the same output dimensionality (i.e.,appropriate output map size H×W, as well as the appropriate number ofchannels C) is generated (e.g., 330A, 330B, and 330C). The individualtensors 330A, 330B, and 330C are summed across all scalesg_(m)(c_(m)),m=1, . . . , M, and optionally in an alternativeembodiment, another non-linear transformation g(⋅) is applied for jointprocessing. As such, as depicted in FIG. 3A, the feature extractionmodule 205 generates a summed tensor 340, hereafter denoted as tensor y∈R^(C×H×W), which is quantized and encoded.

As described above, during the training phase, the feature extractionmodule 205 trains a feature extraction model using machine learningtechniques, e.g., a convolutional network, that determines (1) thedownsampling operator for generating M individual levels of downsampledimages 310 and (2) the parameterized functions f_(m)(⋅), g_(m)(⋅), andg(⋅). In one embodiment, the feature extraction module 205 recursivelyanalyzes images from a training set via feature extraction anddownsampling operators to extract coefficients from the images. Theparameterized functions f_(m)(⋅), g_(m)(⋅), and g(⋅) are represented byone or more convolutional layers with non-linearities in between.

In various embodiments, the feature extraction module 205 iterativelytrains the parameters of the feature extraction model using numeroustraining input images 205 and further incorporates feedback provided bythe ACR module 160 and the reconstruction feedback module 170. In otherembodiments, the feature extraction module 205 further incorporatesfeedback from the discrimination module 180. For example, the feedbackprovided by the ACR module 160 represents a penalty loss that enablesthe feature extraction model to extract feature coefficients that can bemore efficiently compressed to meet a target codelength. Additionally,the feedback provided by the reconstruction feedback module 170represents a reconstruction quality loss between a reconstructed inputimage 275 and the original input image 205. As such, the featureextraction model considers this feedback to extract feature coefficientsthat enable high quality reconstructions. Thus, the feature extractionmodel is iteratively trained to extract feature coefficients that, whencompressed by the AAC module 225, effectively balance the reconstructionloss and penalty loss.

In various embodiments, the quantization module 215 is given a desiredprecision of B number of bits. The desired precision of B bits is set tomaximize the quality of the reconstructed image while also achieving aparticular target compression rate or bit rate. The machine learningmodel of the feature extraction module 205 can be trained to recognizethe identified joint structures from the feature extraction module 210given a target desired precision of bits. For example, the targetdesired precision of bits is selected to minimize the loss of theidentified structures during quantization process.

Given the extracted tensor y ∈R^(C×H×W), the quantization module 215quantizes the extracted tensor y 340 from the feature extraction module210 to a target desired precision of B number of bits to generate aquantized tensor ŷ. For example, the extracted tensor y 340 withdimensionality C×H×W is quantized into 2^(B) equal-sized bins asdescribed by Equation (1) below. Other embodiments may use otherquantization formulas.

$\begin{matrix}{{\hat{y}\mspace{14mu}\text{:=}\mspace{14mu}{{QUANTIZE}_{B}(y)}} = {{{QUANTIZE}_{B}\left( y_{chw} \right)} = {\frac{1}{2^{B - 1}}\left\lbrack {2^{B - 1}y_{chw}} \right\rbrack}}} & (1)\end{matrix}$In various embodiments, the quantization module 215 is given a desiredprecision of B number of bits. The desired precision of B number of bitsmay be hard-coded according to the size (e.g., pixels) of the inputimage 205. In various embodiments, the number of bits may be set basedon the identified joint structures from the feature extraction module210. For example, the number of bits may be previously set such that theidentified structures are not lost during quantization.

The bitplane decomposition module 220 decomposes the quantizedcoefficients. For example, the bitplane decomposition module 220decomposes the quantized tensor ŷ into a binary tensor of multiplebitplanes, which is suitable for encoding via an invertible bitplanedecomposition, as described by Equation (2) below.b:=BITPLANEDECOMPOSE(ŷ)∈{0,1}^(B×C×H×W)  (2)

Reference is now made to FIG. 3B, which depicts an example process ofbitplane decomposition and arithmetic coding of each bitplane, inaccordance with an embodiment. The quantization process of coefficientsdoes not affect the dimensionality of the quantized tensor ŷ, andtherefore it may have a dimensionality of C×H×W. FIG. 3B depicts aninput of a single channel 350 of the quantized tensor ŷ with a2-dimensional dimensionality of H×W quantized coefficients beingdecomposed into B bitplanes, where H=3, W=3, and B=4. Each quantizedcoefficient is represented by a quantized value expressed by the Bnumber of bits applied by the quantization module 215. For each channel350 of the quantized tensor ŷ, the bitplane decomposition module 220decomposes the quantized tensor ŷ into B number of bitplanes. Asdepicted in FIG. 3B, the channel 350 is decomposed into 4 bitplanes. Forexample, for each quantized coefficient, the first bitplane 360A is thehighest bitplane that corresponds to the bits of the quantizedcoefficient at the highest bitplane. The second bitplane 360B is thesecond highest bitplane that corresponds to the bits of the quantizedcoefficient at the second bitplane. Similarly, the third bitplane 360Cand the fourth bitplane 360D are the third and fourth highest bitplanesthat correspond to the bits of the quantized coefficient at the thirdand fourth bitplane, respectively. The output of the bitplanedecomposition module 220 is a binary tensor of size B×C×H×W and isdenoted as b∈{0, 1}^(B×C×H×W) That is, for each channel C, there are Bbitplanes, each bitplane having a height H and a width W. This bitplanedecomposition expands each quantized coefficient into B bitplanes ofbinary values, and this decomposition is an invertible transformation.

In various embodiments, the bitplane decomposition module 220 providesthe binary tensor of size B×C×H×W to the progressive representationmodule 250. The progressive representation module 250 generates aprogressive representation of the input image by determining whichportions of the binary tensor to include in the progressiverepresentation. During the training phase, the progressiverepresentation module 250 trains a zero-mask that determines whichbitplanes and channels to include within the progressive representationgiven a target rate. As such, the bitplanes and channels included withinthe progressive representation are provided to the AAC module 225. Theprogressive representation module 250 is described in further detailbelow.

Each of the bitplanes and channels included in the progressiverepresentation are then encoded by the adaptive arithmetic codingmodule, e.g., AAC 225, for variable-length encoding, as described byEquation (3) below:s:=AAC_ENCODE(b)

.  (3)where b is encoded by AAC 225 into its final variable-length binarysequence s of length

(s). The AAC module 225 further compresses the output from the bitplanedecomposition module 220 to improve the compact representation of aninput image. In one embodiment, the AAC module 225 compresses viaadaptive arithmetic coding, which is a variable-length encoding. The AACmodule 225 leverages the fact that the higher bit planes such as thefirst bitplane 360A and/or the second bitplane 360B shown in FIG. 3B areoften sparser (e.g., many 0 values).

Additionally, the quantized coefficients, in the higher bitplanes, oftenhave similar values as their neighboring quantized coefficients. Assuch, the AAC module 225 can train a machine learning model based onthese facts that enables the individual bitplanes to be encoded withvariable length. As an example, FIG. 3B depicts that the highestbitplane (e.g., first bitplane 360A) can be encoded by a first set ofbits (e.g., an individual bit 365A), the second bitplane 360B can beencoded by a second set of bits 365B (e.g., 3 total bits), the thirdbitplane 360C can be encoded by a third set of bits 365C (e.g., 6 totalbits), and the fourth bitplane 360D can be encoded by a fourth set ofbits 365D (e.g., 10 total bits). The process performed by the AAC module225 is described in detail below.

In one embodiment, the AAC module 225 trains a machine learning model toassociate a processing unit within a bitplane with a context feature,which is one of K discrete values based on its context. The descriptionhereafter is in reference to a single bit, however, in otherembodiments, the AAC module 225 may also handle groups of bits (e.g.,more than one bit), hereafter referred to as a processing unit. Thecontext of a current bit, may include, among other features, the valueof its neighboring bits (e.g., bits to the left, above and in previousbitplanes of the current bit location), as well as the current bit'schannel index, and bitplane index (e.g., high or low bitplane). Anotherfeature is whether any co-located bits of previously processed bitplaneindices are non-zero. For example, a previously processed bitplane indexis a higher bitplane. During training, for each of the K contextfeatures, the machine learning model is trained to predict a featureprobability which represents the likelihood that bits with that featurehaving a value of 1. In one embodiment, the feature probability is theempirical expected value of bits for each feature K after applying aLaplace smoothing operation.

Reference is now made to FIG. 4A which illustrates the training processof the AAC module 225 to train a machine learning model to predictprobability of context features, in accordance with an embodiment. Theoutput of bitplane decomposition (e.g., binary code 405: B×C×H×W ∈(0,1)) is used as input to train the model that determines context featureprobabilities 420. Specifically, each bit location in a decomposedbitplane is associated with a context feature 410, which is one of Kdiscrete values based on its context (e.g., B×C×H×W ∈(1, K)). Thecontext may include, among other features, the current bit's channelindex, bitplane index (e.g., high or low bitplane), and value ofneighboring bits. For example, a neighboring bit may be a bit in thesame bitplane that is to the immediate left, immediate above, orimmediate left and above (e.g., diagonal) to the current bit location.During training, for each of the K context features, the machinelearning model is trained to predict a feature probability 420 whichrepresents the likelihood that a bit with that context feature 410 has avalue of 1. For example, the feature probability 420 may be calculatedbased on a total histogram count 415 of bits (e.g., positive 1×K∈Z_(≥0), total 1×k ∈Z_(≥0)) from the binary code 405 with each of the Kcontext features. In various embodiments, the feature probability 420(e.g., 1×K ∈(0,]) is calculated as the fraction of times in the trainingdata the bit associated with that feature had the value 1, possiblysmoothed with a Laplace smoothing process. The AAC module 225 stores thecalculated feature probability 420 in the training data store 190 (shownin FIG. 1) for predicting context feature probabilities during adeployment phase.

The machine learning model, which is trained to predict the featureprobabilities 420, is later used during the deployment phase. As shownin FIG. 4B, the AAC module 225 computes the probabilities 430 of inputbinary tensor 440 using the pre-calculated feature probabilities 420predicted by the trained model, e.g., by mapping the context features410 for each bit of the binary tensor 440 to the corresponding contextfeatures of the pre-calculated feature probabilities 420, Based on thecomputed probabilities 430, the AAC module 225 compresses the binarycode 440 using adaptive arithmetic coding to generate the compressedbinary code 450. Deployment of the trained model of the AAC module 225is further described below.

Reconstruction Process

Referring back to FIG. 2A, FIG. 2A further depicts the decoder module150 that includes an adaptive arithmetic decoder (AAD) module 230, abitplane composition module 235 and a feature synthesizer module 240. Invarious embodiments, the decoder module 150 receives the compressedbinary code from the encoder module 140 and reconstructs the input image205 by reversing the process undertaken by the encoder module 140.

For example, the AAD module 230 reverses the compression processundertaken by the AAC module 225 by applying an adaptive arithmeticdecoding to the compressed binary code. In various embodiments, the AADmodule 230 may use the machine learning model trained by the AAC module225 to obtain the probabilities of context features of the compressedbinary code. For example, the AAD module 230 receives the compressedbinary code (e.g., 450 from FIG. 4B) and applies the model that istrained to compute the context feature 410 for each bit based on itscontext inferred from previously decoded bits. Then, the AAD module 230uses the feature probability 420 to decode the bit of the compressedbinary code 450. As such, the binary code 440 can be regenerated fromthe compressed binary code 450.

The bitplane composition module 225 re-compositions or compounds the Bbinary images (corresponding to B different bitplanes) to generate are-composed image of coefficients having 2^(B) possible values. Aspreviously stated, the decomposition of quantized coefficients of aninput image into the bitplanes is an invertible transformation.Similarly, the compositioning of the bitplanes is also an invertibletransformation. The new recomposed image is used to generate thequantized tensor ŷ of the above Equation (1).

The feature synthesizer module 240 recognizes the structures previouslyidentified by the feature extraction module 210 (e.g., as described byEquation (1) above) and outputs the reconstructed input image 275. Insome embodiments the feature synthesizer module 240 performs the inverseoperation of FIG. 3A. That is, starting with a reconstructed tensor ŷ,the feature synthesizer module 240 applies a transformation g′( ), andfurther transforms the output by transformation g₁′( ), g₂′( ), . . . toobtain coefficient tensors c₁′, c₂′, . . . for each scale, then appliesimage synthesis transformations f₁′, f₂′ . . . , to obtainreconstructions at each scale. Each of them is upsampled to the nextscale using transformations D_(m)′ and added together to obtain thereconstructed image 275. In some embodiments the transformations D_(m)′,f_(m)′(⋅), g_(m)′(⋅), and g′(⋅) are set to be the inverse of thecorresponding transformations in the feature extraction module 210, andin other embodiments they are trained independently. However, given thatthe process to generate the quantized tensor ŷ is a lossy operation,there is a loss in quality in the reconstructed input image 275.

The reconstructed input image 275 and the original input image 205 areeach provided to the reconstruction feedback module 170 to determine theamount of degradation in quality that has occurred during the encodingand decoding processes, as conducted by the encoder module 140 and thedecoder module 150, respectively. The reconstruction feedback module 170may employ methods that are well known in the art to determine thedeviation between the input image 205 and the output image 275. As oneexample, the reconstruction feedback module 170 calculates differencesof pixel values between the input image 205 and reconstructed inputimage 275. As another example, the reconstruction feedback module 170conducts a pixel by pixel analysis and calculates a mean-square error ora root-mean-square deviation between the input image 205 and the outputimage 275, as well as more sophisticated metrics that considerdifferences in gradient space as well as over multiple scales, such asStructural Similarity Index (SSIM) or Multi-Scale SSIM (MS-SSIM). Otherquality metrics of the quality loss include Peak signal-to-noise ratio(PSNR), Sobel loss, L1-norm, or L2-norm. The calculated deviationbetween the input image 205 and the output image 275 indicates thequality loss of compression from the encoder module 140.

The SSIM is a measure of quality that compares the means and variancesof the reconstruction and compares them to the original. The multi-scalevariant of SSIM (MS-SSIM) performs that operation over multiple scales.In various embodiments, the trained model is a neural network and thefeedback is achieved via backpropagation using gradient descent. In thecase of SSIM and MS-SSIM loss, the derivative of the loss is computedduring the backpropagation step.

In various embodiments, the reconstruction feedback module 170 providesthe quality loss in the output image 275 as feedback to the encodermodule 140. For example, the quality loss information can be stored inthe training data store 190 to be used as training data to fine tune thetrained machine learning models associated with the encoder module 140.As depicted by the dotted lines from the reconstruction feedback module170 in the FIG. 2A, the quality loss information is provided as feedbackto the encoder module 140 through the decoder module 150 and the ACRmodule 160, which regulates the final code length of the input image 205compressed by the encoder module 140.

More specifically, within the encoder module 140, the quality lossinformation is provided to the feature extraction module 210 to thetrain the feature extraction model to better represent structures withinthe input image 205. For example, if quality loss is significant, thefeature extraction model can adjust the operators (e.g., D, f_(m)(⋅),g_(m)(⋅), and g(⋅)) and/or increase the number of individual scalesperformed during the pyramidal decomposition process. The quality lossis also provided to the feature synthesizer module 240 and used to trainits corresponding operators D_(m)′, f_(m)′(⋅), g_(m)′(⋅), and g′(⋅). Thequality loss information is also provided to the AAC module 225 tofurther train the machine learning model to improve the prediction offeature probabilities 420.

The quality loss information is also provided to the ACR module 160 andis used to regulate the expected codelength of the compressed binarycodes of inputs given a target bit rate. This is further discussed inreference to the ACR module 160 below.

Generative Adversarial Networks (GNAs)

In various embodiments, during the training phase, the DLBC system 130further appends a discriminator module 180 that improves the modelstrained by the encoder module 140 (e.g., the feature extraction model bythe feature extraction module 210) through GAN approaches. For example,the discriminator module 180 trains a machine learning model, hereafterreferred to as the discriminator model, that, when applied,distinguishes between two images. For example, the two images may be theoriginal input image 205 and the reconstructed input image 275. Thus,feedback from the discriminator module 180 can be provided back to theencoder module 140 (e.g., to the feature extraction module 210) to moreefficiently extract feature coefficients.

Specifically, the discriminator module 180 receives the reconstructedinput image 275 outputted by the decoder module 150 and the originalinput image 205 (see FIG. 2A). The discriminator module 180 attempts todistinguish between the two images. To do so, the discriminator module180 can train a discriminator model offline to recognize artifacts(e.g., distortions, blurriness, pixelation) in the reconstructed inputimage 275 that differ from the input image 205. In various embodiments,the encoder module 140, decoder module 150, and reconstruction feedbackmodule 170, altogether referred to as the generator pipeline, attemptsto generate reconstructed input images 275 that make it more difficultfor the discriminator module 180 to distinguish between thereconstructed input image 275 and the original input image 205.Therefore, throughout training, the discriminator module 180 and thegenerator pipeline conduct their training together in an adversarialmanner where the generator pipeline continually tries to generatereconstructed input images 275 that are harder to distinguish from theoriginal input image 205. The result is that the generated reconstructedinput images 275 have lower reconstruction loss as training proceeds.The training conducted by the discriminator module 180 and the generatorpipeline may occur in parallel or sequentially. In various embodiments,the training conducted by the discriminator module 180 and generatorpipeline enables the generator pipeline to generate reconstructed inputimages 275 that are indistinguishable by the discriminator module 180.

During a training phase, training of the discriminator model by thediscriminator module 180 can be complicated due to optimizationinstability. In various embodiments, an adaptive training scheme can beutilized. For example, the discriminator module 180 can choose to eithertrain the discriminator model or backpropagate a confusion signalthrough the generator pipeline a function of the prediction accuracy ofthe trained model. The confusion signal makes it more difficult for thetrained discriminator model to distinguish between the original inputimage 205 and the reconstructed input image 275. For example, if theprediction accuracy of the trained model is high, the discriminatormodule 180 may choose to backpropagate a confusion signal through theencoder module 140.

More concretely, given lower and upper accuracy bounds L, U ∈[0, 1] anddiscriminator accuracy a(D), the following procedure is applied:

-   -   If a<L: stop propagating confusion signal, and continuously        train the discriminator model.    -   If L≤a<U: alternate continuously between propagating confusion        signal and training the discriminator model.    -   If U≤a: continuously propagate confusion signal, and freeze the        training of the discriminator model.

During training, the original input image 205 and the reconstructedinput image 275 are provided to the discrimination module as an inputpair. The discrimination module considers each received image withuniform probability that it is either the original or the reconstructedimage. For example, a random binary label can be assigned to the inputpair and the order of the input image 205 and the reconstructed inputimage 275 can be swapped or held the same depending on the random binarylabel. The input pair is then propagated through the network which, invarious embodiments, analyzes the input pair at multiple scales. Forexample, the discriminator module 180 applies the trained model thatdownscales the input image 205 and the reconstructed input image 275. Ateach scale, the trained model accumulates scalar outputs that areaveraged to attain a final value. The final values are provided to aterminal sigmoid function (e.g., summed) to generate an aggregate sumacross scales. The discriminator module 180 proceeds to formulate adecision on the original input image 205 and reconstructed input image275 according to the aggregated sum.

This multiscale architecture of the discriminator module 180 allowsaggregating information across different scales, and is motivated by theobservation that undesirable artifacts vary as a function of the scalein which they are exhibited. For example, high frequency artifacts suchas noise and blurriness are discovered by earlier scales, whereas finerdiscrepancies are found in deeper scales.

Codelength Regularization Process

The ACR module 160 regulates the expected codelength of the compressedbinary code of an input image to balance the different objectives of 1)reconstruction quality and 2) compression ratio as described by Equation(4) below:E _(x)[

(s)]=

_(target).  (4)It is noted that compressed binary codes of input images can be abottleneck of an encoder's performance because the binary codes may betoo small to represent complex patterns of content of input images,which affects visual quality, and the binary code may be too wasteful inrepresenting simple patterns. The ACR module 160 trains a model capableof generating long representations for complex content patterns andshort ones for simple content patterns, while maintaining an expectedcodelength target over a large number of training examples.

Referring to FIG. 2A, the ACR module 160 receives a compressed binarycode of an input image generated by the AAC module 225. Additionally,the ACR module 160 receives the quantized tensor ŷ from the quantizationmodule 215. The ACR module 160 controls the expected length of thecompressed code (the output of the AAC module 225). In some embodimentsthe ACR module 160 controls the sparsity of the binary feature tensorsince sparser messages are more predictable and result in more compactcompression by the AAC module 225. In some embodiments, sparsity isinduced by an activation penalty loss for each quantized coefficientproportional to its magnitude. This results in adjusting the featureextraction module 210 to produce coefficients with smaller magnitudes,which induces sparsity in the higher bitplanes produced from thebitplane decomposition. Inducing sparsity is a special-case of makingthe sequence of bits in the binary feature tensor more predictable,which results in more compact compressed code. In other embodiments, theACR module 160 increases predictability by adding a penalty that inducesspatially adjacent coefficients to have more similar magnitudes.

Specifically, the ACR module 160 calculates a penalty score for eachquantized coefficient of the quantized tensor ŷ. The penalty for aquantized coefficient at a particular position chw in the quantizedtensor ŷ may be expressed as Equation (5) below:P(ŷ _(chw))=log₂ |ŷ _(chw)+Σ_((x,y)∈S) log₂ |ŷ _(chw) −ŷ_(c(h−y)(w−x))|}  (5)for difference index set S={(0, 1), (1, 0), (1, 1), (−1, 1)}.

A first penalty factor corresponds to the first term of the penaltyEquation (5) (e.g., log₂|ŷ_(chw)|), which represents a magnitude penaltyand penalizes a quantized coefficient of interest based on the magnitudeof its quantized value. Therefore, quantized coefficients that are largein magnitude are more heavily penalized than quantized coefficients thatare smaller in magnitude. This reflects the higher sparsity of bits inthe higher bitplanes. A second penalty factor corresponds to a secondterm (e.g., Σ_((x,y)∈S) log₂|ŷ_(chw)−ŷ_(c(h−y)(w−x))|), which representsa spatial penalty as it penalizes deviations between neighboringquantized coefficients, which enables better prediction by the AACmodule 225. Neighboring quantized coefficients include quantizedcoefficients that are immediately adjacent to the quantized coefficientof interest in a bit location in the same bitplane. Additionally,neighboring quantized coefficients may also include quantizedcoefficients that are in the same bit location in an immediatelypreceding bitplane. This reflects the likelihood that a quantizedcoefficient of interest and its neighboring quantized coefficients oftenhave similar quantized values.

In various embodiments, the calculated penalty for a quantizedcoefficient further includes a third penalty factor that is dependent onhow heavily the quantized coefficient impacts the length of thecompressed binary code. For example, during training, the ACR module 160may calculate the third penalty factor by changing the value of thequantized coefficient. For each bit in the B×C×H×W tensor, the ACRmodule 160 can produce the third penalty factor that can be proportionalto the change in encoded message length as a result of flipping thatbit.

The calculated penalties of the quantized coefficients are provided tothe feature extraction module 210 to adjust the parameters of the modeltrained by the feature extraction module 210 such that future featurecoefficients extracted by the trained model can be more efficientlycompressed by the AAC module 225. More specifically, the magnitude ofthe ACR module 160 penalty loss that is provided to the featureextraction module 210 controls the tradeoff between reconstructionquality and compression rate. In some embodiments, this tradeoff iscontrolled by having the ACR module 160 observe the average length ofcompressed binary codes during training and compare it to a targetcodelength.

Specifically, the ACR module 160 may calculate a penalty for thequantized tensor ŷ based on the individual penalties of the quantizedcoefficients as shown above in Equation (5). For example, the penaltymay be calculated as:

$\begin{matrix}{{P\left( \hat{y} \right)} = {\frac{\alpha_{t}}{CHW}\Sigma_{chw}\left\{ {P\left( {\hat{y}}_{chw} \right)} \right\}}} & (6)\end{matrix}$

The penalty equation of Equation 6 also includes a scalar value α_(t)that is modulated based on the model trained by the ACR module 160.During the training phase, the ACR module 160 may monitor a mean numberof effective bits of the compressed binary code received from the AACmodule 225 for numerous input images 205. If the monitored mean numberof effective bits is higher than a target codelength, the trained modelincreases the scalar value α_(t) to increase the penalty value for eachquantized coefficient. Likewise, if the monitored mean number ofeffective bits is lower than a target codelength, the trained modeldecreases the scalar value α_(t).

In other embodiments, the ACR module 160 modulates the magnitude of thescalar value α_(t) to achieve a given target reconstruction qualityrate. In this case, instead of receiving the compressed codelength fromAAC module 225, the ACR module 160 receives the reconstruction qualityfrom reconstruction feedback module 170.

Progressive Representation

Returning to the progressive representation module 250 as depicted inFIG. 2A, it is often desirable to construct progressive versions of acompressed code of an input image, which enable reconstructing the inputimage given only a truncation of its representation, e.g., only thefirst few bits of its compressed code. A progressive representation isvaluable in various scenarios. For example, in streaming settings, aprogressive representation allows displaying digital content to a userright away as opposed to waiting for transmission of the entirecompressed code to complete. The quality of the reconstruction isimproved as additional bits of the compressed code arrive. For example,a progressive version is beneficial in that if the progressive versionis sent to a client device 110, the client device 110 can appropriatelyreconstruct the input image 205 right away using transmitted bits of theprogressive version as opposed to waiting for the transmission tocomplete. The quality of reconstruction of the input image 205 by theclient device 110 is further improved as additional bits are received.

Additionally, a progressive version also enables computationalefficiency as it is often desirable to send different client devices 110different bitrate versions of the same content. For example, a highestquality version of the progressive representation may be computed andstored once, and can be subsequently truncated to appropriate lengths togenerate different progressive versions that are each appropriate for atarget bitrate.

In one embodiment, the progressive representation module shown in FIG. 1trains a machine learning model, e.g., a neural network of a trainedzero-mask that enables a progressive representation. During training,the progressive representation module 250 applies a trained zero-mask togenerate a progressive version of an input image as a function of aspecified bitrate. In this scenario, the trained zero-mask isinput-independent based on a given particular channel index or bitplaneindex. In another scenario, the trained zero-mask is input dependent,e.g., based on the norm of activations or some other criteria. Duringdeployment, values that are masked will not be transmitted to a clientdevice. Therefore, for a smaller bitrate, the trained zero-mask seeks tomask a larger number of bits, thereby enabling the transmission of fewerbits to a client device 110.

In some embodiments, to train the zero-mask, the progressiverepresentation module 250 randomly samples various rates, each raterepresented as r_(t)∈(0, 1]. The progressive representation module 250follows a machine learning technique, e.g., a nested dropout, whichtrains the zero-mask to map the rate r_(t) to a particular truncation ofthe representation (e.g., feature coefficient tensor). For example, thezero-mask can be iteratively trained to identify the particulartruncation location. At a first iteration, the zero-mask may target aninitial truncation location of the representation. This initialtruncation location corresponds to an initial subset of extractedfeature coefficients that each has a particular tensor position (e.g.,bitplane index and/or channel index). At subsequent iterations, thezero-mask may continue to truncate the representation. In other words,the zero-mask removes additional extracted feature coefficients from theinitial subset. In various embodiments, the feature coefficients thatare removed from the initial subset have a lower tensor position (e.g.,lower channel index and/or lower bitplane index) than featurecoefficients that remain. Over the training iterations, the zero-masksettles on a particular truncation location of the representation thatcorresponds to the rate.

In various embodiments, the representation may have two or moredimensions including a height (H) and width (W). Other dimensions may bechannels (C) and bitplanes (B). For example, given a binary tensor b∈{0, 1}^(B×C×H×W), the progressive representation module 250 trains themodel with a zero-mask applied to all values with channel index c∈{Γr_(t)CΓ, . . . , C}. In other words, the first channels are rarelyzeroed out, while the last channels are highly likely to be zeroed outor masked. This results in the neural network learning that the firstchannels (e.g., channels with low indices) are more reliable andchoosing them to transmit the most important information. Duringdeployment, the progressive representation module 250 uses the trainedzero-mask to decide how many of the channels to transmit so that theDLBC system 130 can achieve the right tradeoff between compression sizeand quality. Although the previous description is in regards tochannels, the zero-mask may also be trained to map to a truncationcorresponding to a particular position in the representation, hereafterreferred to as a tensor position. For example, the zero-mask is trainedto map to a truncation corresponding to a particular bitplane (e.g.,bitplane index). Therefore, the progressive representation module 250may additionally or alternatively decide how many bitplanes are to betransmitted. In other embodiments, the zero-mask is trained to map to atruncation corresponding to both channels and bitplanes.

Reference is now made to FIG. 5, which depicts the generation of aprogressive representation of an input image, in accordance with anembodiment. For a target bitrate, the trained zero-mask may truncate 510(e.g., using a zero mask) the input representation 505 to have atruncated dimensionality of C′×H×W, which provides an acceptable balancebetween the compression ratio and visual quality of the inputrepresentation 505. Therefore, for that target bitrate, the truncatedversion can be sent to a client device 110.

More specifically, the progressive representation 505 may have originaldimensionality B×C×H×W. In various embodiments, the progressiverepresentation module 250 implicitly orders the bitplanes (B) andchannels (C) of the input representation 505 based on their respectiveimportance. As an example, each bitplane and channel may be associatedwith an index. A lower index associated with each bitplane and eachchannel represents a higher likelihood that the bitplane and/or channelis included in a progressive representation. A higher index represents alower likelihood that the bitplane and/or channel is included in theprogressive representation.

Generally, the most important channels and/or bitplanes are orderedfirst such that they can be first transmitted to a client device 110.The most important channels and/or bitplanes represent the bits thatenable the client device 110 to reconstruct the input image. Thesubsequent data channels ordered behind the most important channelsand/or bitplanes represent the bits that, when transmitted to a clientdevice 110, enable the reconstruction of the input image at a higherquality. As such, the most important channels and/or bitplanes are notaffected by the applied zero-mask, whereas the channels and/or bitplanesthat are ordered below a truncation point are zeroed by the appliedzero-mask.

In other embodiments, the zero-mask may be applied on the binary B×C×H×Wtensor after bitplane decomposition. The mask may be set up to zero-outthe least significant (e.g., highest index) bitplanes (i.e. thezero-mask is applied along the bitplane dimension). In otherembodiments, the zero-mask may be applied along both channel andbitplane dimensions. As an example, the zero-mask may be applied toprogressively zero out bitplanes of a given channel before going to thenext one. As another example, the zero-mask may be applied with mixedordering, such as the first bitplane of the first channel, then thefirst bitplane of the second channel, then the second bitplane of thefirst channel, and so on.

For example, a first representation in the set of representations istransmitted first to a client device 110. The first representationcorresponds to the most important information (e.g., bits) that even theclient device 110 with a lowest target bitrate can adequatelyreconstruct, albeit at low quality. Subsequent representations in theset of representations each include bits that, when transmitted to aclient device 110 with a higher target bitrate, enables the clientdevice 110 to reconstruct the input image with a higher quality.

Deployment Phase of the Encoding Process

Referring back to FIG. 2B, FIG. 2B is flow diagram of the architectureof the DLBC system 130 during the deployment phase, in accordance withan embodiment. The feature extraction module 210 of the encoder module140 receives an input image 205 that is to be sent to one or more clientdevices 110. The feature extraction model 210 applies a trained modelthat produces the extracted feature coefficients tensor 340 with atarget output dimensionality of C×H×W. In some embodiments, this isaccomplished through pyramidal decomposition followed by interscalealignment. The quantization module 215 quantizes the extracted featurecoefficients tensor 340 and outputs the quantized tensor ŷ. The bitplanedecomposition module 220 separates the individual channels of thequantized tensor ŷ and for each individual channel 350, decomposes thechannel into binary bitplanes 360 through an invertible transformation.The binary bitplanes 360 are provided to the progressive representationmodule 250 to determine the bitplanes (and channels) that will betransmitted to a client device 110.

The progressive representation module 250 generates an appropriateprogressive representation of the input image 205. For example, theprogressive representation module 250 receives an indication of aspecified rate, e.g., target bit rate for a client device 110. Aspecific bitrate may be provided by the client device 110 and reflectscertain limitations of the client device 110 (e.g., bandwidth,processing power, computing resources). The progressive representationmodule 250 retrieves a version of the compressed binary code for theinput image that represents the highest quality version (e.g., includesthe most bits) of the input image. The progressive representation module250 applies a trained model, otherwise referred to as a trainedzero-mask, that is previously trained to map the specified rate to aparticular truncation of a representation (e.g., quantized tensor ŷ). Asan example, referring to FIG. 5, the first few channels (e.g., C′ inFIG. 5) of the input representation 505 may be maintained while the lastremaining channels are zeroed by the applied zero-mask. The progressiverepresentation is a representation of the input image 205 for thatparticular specified rate.

The progressive representation is provided to the AAC module 225 foradaptive arithmetic coding. The AAC module 225 further compresses thebitplanes 360 (e.g., binary code 440) to generate compressed binary code450. To do so, the AAC module 225 applies a trained model that waspreviously trained to predict feature probabilities 420 from a set ofbinary code 405.

Reference is now made to FIG. 4B, which illustrates the deploymentprocess of the AAC module 225, in accordance with an embodiment. Here,each bit of the binary code 440 is similarly associated with one or morecontext features 410 based on the context of the bit. The featureprobabilities 420 are received from the model trained by the AAC module225 and are used in conjunction with the binary code 440 such that aprobability 430 of a value (e.g., 0 or 1) of each context feature 410can be looked up. In various embodiments, the AAC module 225 determines,for each bit, a probability 430 that the bit has a value of 1 based onthe context of the previously seen, neighboring bits. Thus, the AACmodule 225 can use the probabilities 430 to further compress the binarycode 440 via arithmetic coding into a compressed variable length binarycode 450. This compressed binary code 450 can be transmitted to a clientdevice 110 for appropriate decoding and playback.

Providing a Progressive Representation Through Sequential Reconstruction

In various embodiments, during deployment, the encoder module 140generates compressed binary codes for a progressive representation of aninput image 205 using sequential reconstruction, a process that isperformed by the sequential reconstruction module 280. For example, theprogressive representation module 250 may receive the decomposedbitplanes from the bitplane decomposition module 220 that altogetherrepresents a binary tensor with dimensions B×C×H×W. The sequentialreconstruction module 280 generates a first representation from thebinary tensor. As an example, the first representation may be a defaultrepresentation that corresponds to a lowest target bitrate. This firstrepresentation is provided to the AAC module 225 for compression, whichoutputs the compressed binary codes corresponding to this firstrepresentation.

In various embodiments, the compressed binary codes corresponding tothis first representation is decoded by the decoder module 150 of theDLBC system 130 to generate a reconstructed input image. Thereconstructed input image is compared to the original input image todetermine a difference, hereafter referred to as an error. This errormay be provided back to the sequential reconstruction module 280 whichgenerates a second representation corresponding to this difference. Thesecond representation is compressed by the AAC module 225 to generatecompressed binary codes corresponding to the second representation andthe process is repeated. For example, these compressed binary codes aredecoded, compared to the original input image to generate a seconddifference, which the sequential reconstruction module 280 can generatea third representation that corresponds to the second difference. In oneembodiment, the compressed binary codes corresponding to the progressiverepresentation is generated by concatenating the compressed binary codescorresponding to the first, second, third, and subsequentrepresentations. In other embodiments, each separate compressed code(e.g., corresponding to the first, second, third, and subsequentrepresentations) are individually transmitted to the client device 110.

At each sequential iteration, the sequential reconstruction module 280may generate a subsequent representation that corresponds to the fulloriginal input image, or only a portion of the original input image. Forexample, in one embodiment, the sequential reconstruction module 280considers every quadrant of the original input image. In otherembodiments, the sequential reconstruction module 280 only considersquadrants of the original input image whose reconstruction error wasabove a given threshold during the previous iteration.

In various embodiments, the number of sequential iterations that areconducted in generating the compressed binary codes that correspond tothe progressive representation may be determined by satisfying acriterion such as a threshold maximum of the combined size of thecompressed binary codes. Another criterion may be when the generateddifference falls below a maximum target reconstruction error. Thesecriteria may be set depending on a target rate.

Referring back to FIG. 1, the decoder module 115 of the client device110 receives the compressed binary codes. For example, if the receivedcompressed binary codes correspond to different representations (e.g.,the first, second, third, and subsequent representations), the decodermodule 115 of the client device 110 decodes the first representation toobtain an initial reconstruction. Subsequently, the decoder module 115decodes the second, third and subsequent representations in order toobtain the differences that can then be added to the initialreconstruction to improve the reconstruction quality.

Deployment Phase for a Video Content Input

In various embodiments, the input image 205 may be a video content withvideo frames. Therefore, the encoder module 140 properly encodes thevideo content to be sent to the client device 110. For example, duringdeployment, the feature extraction module 210 applies a frame predictormodel that has been previously trained to predict a current video frame(e.g., coefficients and structures) based on the previous video frames.Thus, the feature extraction module 210 receives the predicted videoframe and calculates a difference between the predicted video frame andthe actual current video frame. The difference is hereafter referred toas a residual frame. The residual frame can undergo the appropriatecompression process including decomposition by the bitplanedecomposition module 220 and compression by the AAC module 225.Therefore, in various embodiments, the compressed residual frame, asopposed to the actual video frame, is provided to the client device 110.As the frame predictor model is trained over time, the residual is smalland effectively compressed, thereby saving computational resources incomparison to compressing the actual video frame. The client device 110receives the compressed residual frame and the decoder module 115 of theclient device 110 appropriately decodes the residual frame for playback.

Encoding an Input Image by the DLBC System

FIG. 6 is a flowchart for the generation of a compressed encoding of aninput image, in accordance with an embodiment. The DLBC system 130receives 610 an input image that is to be encoded and sent to a clientdevice 110. The DLBC system 130 extracts 612 feature coefficients acrossmultiple scales of the input image based on a trained feature model. Invarious embodiments, the DLBC system 130 performs a pyramidaldecomposition of the input image according to the trained feature modelto extract features across multiple scales. For example, the trainedfeature model may determine how the multiple scales of the input imageare generated. More specifically, the trained feature model may specifyvarious downsampling operators that each downsamples the input imagefrom a one scale to another scale.

The DLBC system 130 aligns the extracted feature coefficients andidentifies 614 joint structures across the multiple scales based on thealigned coefficients. For example, the DLBC system 130 can apply atrained model that is trained to align the coefficients and to identifythe structures across the scales. The DLBC system 130 quantizes 616 thealigned coefficients of the input image.

The DLBC system 130 decomposes 618 the quantized coefficients of theinput image into multiple bitplanes according to a set precision of Bbits. For example, each of the quantized coefficients is decomposed intoB different bitplanes. As such, each bit of the B different bitplaneseither has a value of 0 or 1. The DLBC system 130 may determine 620 aportion of the B different bitplanes to be transmitted to a clientdevice 110. For example, the DLBC system 130 may generate a progressiverepresentation of the input image that includes a portion of thebitplanes. The DLBC system 130 applies 622 a trained AAC model to thedetermined portion of bitplanes to generate compressed binary codes. Forexample, application of the trained AAC model predicts the probabilityof each bit given its context feature, thereby enabling the DLBC system130 to compress the binary codes using arithmetic coding. Thiscompressed code of the input image can then be sent to client devices110.

Providing a Progressive Version of an Encoded Input Image

FIG. 7 is a flowchart for providing a progressive representation of anencoded input image to a client device, in accordance with anembodiment. The DLBC system 130 extracts 710 feature coefficients froman input image (or in the case of sequential reconstruction, a portionof the input image). As previously described, the DLBC system 130 maypyramidally decompose the input image across a number of scales andextract feature coefficients at each scale.

The DLBC system 130 further receives a target compression rateassociated with the input image. In various embodiments, the targetcompression rate may be provided by a client device 110. As an examplescenario, the DLBC system 130 may first provide a default version of anencoded input image to a client device 110. In response, the DLBC system130 receives an indication of a target compression rate from the clientdevice 110. In various embodiments, the target bitrate may be an optimalbitrate of the encoded input image that the client device 110 can handlebased on available resources (e.g., bandwidth, computing resources,processing power).

Given the target compression rate, the DLBC system 130 selects 714 asubset of the extracted feature coefficients. The subset of extractedfeature coefficients corresponds to the target compression rate. Forexample, the higher the target compression rate, the more featurecoefficients are included in the subset.

The DLBC system 130 generates 716 the progressive representation of theinput image based on the selected subset of extracted featurecoefficients. For example, the selected subset of feature coefficientsmay correspond to channels and/or bitplanes of the decomposed quantizedtensor ŷ. As such, the DLBC system 130 applies a zero-mask that istrained to truncate the representation of the input image at aparticular location. As an example, the channels and/or bitplanes thatcorrespond to the selected subset of feature coefficients aremaintained. In various embodiments, all channels and/or bitplanes of therepresentation of the input image were previously ordered by a trainedmodel according to an index associated with each channel and/orbitplane. As such, the channels and/or bitplanes that correspond to theselected subset of feature coefficients are indexed first and aretherefore maintained when the trained zero-mask is applied.

Generating an Encoded Input Image With a Target Codelength

FIG. 8 is a flowchart for generating a compressed encoding of an inputimage with a target codelength, in accordance with an embodiment. TheDLBC system 130 receives 810 quantized coefficients of an input image.In various embodiments, the quantized coefficients are provided by afirst trained model that was previously trained to extract quantizedcoefficients that lead to improved compression. For example, duringtraining, the first trained model may receive a training input image andas such, extract quantized coefficients from the training input imagegiven a set of training parameters. The first trained model can computea penalty for each extracted quantized coefficient and adjust the set oftraining parameters in order to minimize the computed penalties. Thus,if the first trained model were to receive the same training inputimage, the first trained model, when using the adjusted set of trainingparameters, would identify and extract quantized coefficients that wouldlead to an improved compression ratio. The first trained model can beiteratively trained over numerous training images during the trainingphase.

The DLBC system 130 converts 812 the received quantized coefficientsinto one or more processing units. A processing unit may be a single bitor it may refer to more than one bit. In various embodiments, theconversion process is a bitplane decomposition process that decomposeseach quantized coefficient into bits on B bitplanes.

For each processing unit, the DLBC system 130 computes 814 a probabilityof the value of the processing unit. The DLBC system 130 may considervarious factors in computing the probability including 1) a context ofthe processing unit and 2) feature probabilities that are received froma second trained model. Referring to the context of the processing unit,it may refer to values of previously encoded neighboring processingunits and a channel index of the processing unit. If the processing unitis a single bit in a bitplane, the context may further include abitplane index of the processing unit and values of co-locatedprocessing units that are on a different bitplane, but at the samelocation within the bitplane as the processing unit. Referring to thefeature probabilities received from the second trained model, in variousembodiments, the second trained model is trained during a training phaseto predict feature probabilities. Namely, a feature probabilityrepresents the likelihood that a processing unit that is associated witha particular context feature has a certain value. Therefore, duringdeployment, the DLBC system 130 can map each context feature 410 to aprobability 430 by looking up the probability of each feature based onthe received feature probability.

The DLBC system 130 generates 816 compressed binary codes of the inputimage using entropy coding. As an example, the entropy coding isarithmetic coding that utilizes the computed probability of eachprocessing unit.

Summary

The foregoing description of the embodiments of the invention has beenpresented for the purpose of illustration; it is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Persons skilled in the relevant art can appreciate that manymodifications and variations are possible in light of the abovedisclosure.

Some portions of this description describe the embodiments of theinvention in terms of algorithms and symbolic representations ofoperations on information. These algorithmic descriptions andrepresentations are commonly used by those skilled in the dataprocessing arts to convey the substance of their work effectively toothers skilled in the art. These operations, while describedfunctionally, computationally, or logically, are understood to beimplemented by computer programs or equivalent electrical circuits,microcode, or the like. Furthermore, it has also proven convenient attimes, to refer to these arrangements of operations as modules, withoutloss of generality. The described operations and their associatedmodules may be embodied in software, firmware, hardware, or anycombinations thereof.

Any of the steps, operations, or processes described herein may beperformed or implemented with one or more hardware or software modules,alone or in combination with other devices. In one embodiment, asoftware module is implemented with a computer program productcomprising a computer-readable medium containing computer program code,which can be executed by a computer processor for performing any or allof the steps, operations, or processes described.

Embodiments of the invention may also relate to an apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the required purposes, and/or it may comprise ageneral-purpose computing device selectively activated or reconfiguredby a computer program stored in the computer. Such a computer programmay be stored in a non-transitory, tangible computer readable storagemedium, or any type of media suitable for storing electronicinstructions, which may be coupled to a computer system bus.Furthermore, any computing systems referred to in the specification mayinclude a single processor or may be architectures employing multipleprocessor designs for increased computing capability.

Embodiments of the invention may also relate to a product that isproduced by a computing process described herein. Such a product maycomprise information resulting from a computing process, where theinformation is stored on a non-transitory, tangible computer readablestorage medium and may include any embodiment of a computer programproduct or other data combination described herein.

Finally, the language used in the specification has been principallyselected for readability and instructional purposes, and it may not havebeen selected to delineate or circumscribe the inventive subject matter.It is therefore intended that the scope of the invention be limited notby this detailed description, but rather by any claims that issue on anapplication based hereon. Accordingly, the disclosure of the embodimentsof the invention is intended to be illustrative, but not limiting, ofthe scope of the invention, which is set forth in the following claims.

What is claimed is:
 1. A computer-implemented method comprising:receiving an input image to be compressed; generating a tensor for theinput image by applying an encoder portion of a neural networkautoencoder to the input image, where the encoder portion includes atrained set of parameters; quantizing values of the tensor andconverting the quantized values to a plurality of bitplanes, theplurality of bitplanes including one or more processing units, eachprocessing unit having one or more bits; for each processing unit,assigning a respective context feature from a plurality of contextfeatures to the processing unit based on a context of the processingunit, wherein the context of the processing unit includes values ofpreviously encoded, neighboring processing units, and wherein a contextfeature is associated with a respective feature probability thatindicates a likelihood a processing unit assigned to the context featurehas a value of 1; and generating compressed binary codes of the inputimage by performing entropy coding based on the feature probabilitiesfor the context features assigned to the one or more processing units ofthe plurality of bitplanes.
 2. The computer-implemented method of claim1, wherein the context of a processing unit further comprises an indexof a corresponding channel of the processing unit.
 3. Thecomputer-implemented method of claim 1, wherein each bit in a bitplaneof the plurality of bitplanes corresponds to a processing unit.
 4. Thecomputer-implemented method of claim 3, wherein the context of theprocessing unit further comprises a bitplane index of the processingunit.
 5. The computer-implemented method of claim 3, wherein the contextof the processing unit further comprises whether previously encoded,co-located processing units associated with lower bitplane indices havenon-zero values.
 6. The computer-implemented method of claim 1, whereinthe input image is a residual frame of a video predicted from aplurality of video frames of the video.
 7. A non-transitorycomputer-readable storage medium including instructions that, whenexecuted by a processor, cause the processor to perform steps including:receiving an input image to be compressed; generating a tensor for theinput image by applying an encoder portion of a neural networkautoencoder to the input image, where the encoder portion includes atrained set of parameters; quantizing values of the tensor andconverting the quantized values to a plurality of bitplanes, theplurality of bitplanes including one or more processing units, eachprocessing unit having one or more bits; for each processing unit,assigning a respective context feature from a plurality of contextfeatures to the processing unit based on a context of the processingunit, wherein the context of the processing unit includes values ofpreviously encoded, neighboring processing units, and wherein a contextfeature is associated with a respective feature probability thatindicates a likelihood a processing unit assigned to the context featurehas a value of 1; and generating compressed binary codes of the inputimage by performing entropy coding based on the feature probabilitiesfor the context features assigned to the one or more processing units ofthe plurality of bitplanes.
 8. The non-transitory computer-readablestorage medium of claim 7, wherein the context of a processing unitfurther comprises an index of a corresponding channel of the processingunit.
 9. The non-transitory computer-readable storage medium of claim 7,wherein each bit in a bitplane of the plurality of bitplanes correspondsto a processing unit.
 10. The non-transitory computer-readable storagemedium of claim 9, wherein the context of the processing unit furthercomprises a bitplane index of the processing unit.
 11. Thenon-transitory computer-readable storage medium of claim 9, wherein thecontext of the processing unit further comprises whether previouslyencoded, co-located processing units associated with lower bitplaneindices have non-zero values.
 12. The non-transitory computer-readablestorage medium of claim 7, wherein the input image is a residual frameof a video predicted from a plurality of video frames of the video.